package com.itheima.homework1;

import java.io.*;

public class Demo1_Buffer {
    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();
        BufferedInputStream bis =
                new BufferedInputStream(
                        new FileInputStream(
                                "F:/胡彦斌 - 半生出走 (Live).mp3"));
        BufferedOutputStream bos =
                new BufferedOutputStream(
                        new FileOutputStream(
                                "d13_zuoye_IO_String/胡彦斌 - 半生出走 (Live).mp3"));
        int b;
        while ((b = bis.read()) != -1) {
            bos.write(b);
        }
        bis.close();
        bos.close();
        long end = System.currentTimeMillis();
        System.out.println(end-start);
    }
}
